package com.yexiao.cofe.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yexiao.cofe.business.pojo.UserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author lkl
 * @since 2025/4/8
 */
@Mapper
public interface UserRoleMapper extends BaseMapper<UserRole> {

    @Select("select * from user_role where role_id = #{roleId}")
    List<UserRole> selectByRoleId(Integer roleId);

    @Select("select * from user_role where user_id = #{roleId} and is_del = 0")
    UserRole selectByUserId(String userId);
}
